package com.platform.dao;

import com.platform.entity.UserAssetEntity;
import com.platform.entity.excel.UserAssetExcel;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 会员管理:用户资产Dao
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2019-02-01 17:31:55
 */
public interface UserAssetDao extends BaseDao<UserAssetEntity> {

    UserAssetEntity queryObjectForUid(@Param("uid") long uid);

    int updateAsset(UserAssetEntity asset);

    BigDecimal selectTotal();

    List<UserAssetExcel> queryExcelList(@Param("name")String name,@Param("phone")String phone,@Param("sort")Integer sort,
                                        @Param("done")Integer done,@Param("start")Integer start,@Param("size")Integer size);

    Integer updateUserAsset(Map<String,Object> param);

    /**
     * 提现申请失败
     * @param param
     * @return
     */
    Integer cashOutFail(Map<String,Object> param);

    Integer addCoin(Map<String,Object> param);

    //获得统计能量值
    BigDecimal queryTotalEnergyTotal();

    //查询用户统计spc数量
    BigDecimal queryTotalSpcCoin();
}
